<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<script type="text/javascript" src="${pageContext.request.contextPath }/static/layer/layer.js"></script>

<script type="text/javascript">
	function checkData(){
		var	searchStr = $("#searchStr").val() ;
		if(searchStr == null || searchStr == ''){
			layer.msg('请输入你要搜索的内容', {icon: 2});
			return false ;
		}else{
			return true ;
		}
	}
</script>
<div class="row">
		<div class="col-md-12" style="padding-top: 10px">
			<nav class="navbar navbar-default">
			  <div class="container-fluid">
			    <!-- Brand and toggle get grouped for better mobile display -->
			    <div class="navbar-header">
			      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
			        <span class="sr-only">Toggle navigation</span>
			        <span class="icon-bar"></span>
			        <span class="icon-bar"></span>
			        <span class="icon-bar"></span>
			      </button>
			      <a class="navbar-brand" href="${pageContext.request.contextPath }/index.html"><font color="black"><strong>首页</strong></font></a>
			    </div>
			
			    <!-- Collect the nav links, forms, and other content for toggling -->
			    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			      <ul class="nav navbar-nav">
			        <li><a href="${pageContext.request.contextPath }/blogger/about.html"><font color="black"><strong>关于博主</strong></font></a></li>
					
					<c:forEach begin="0" end="7" items="${blogTypeList }" var="blogType">
						<li><a href="${pageContext.request.contextPath }/blog/list/pageNum/1.html?typeId=${blogType.id}"><font color="black"><strong>${blogType.typeName }</strong></font></a></li>
					</c:forEach>
			      </ul>
			      
			      <form onsubmit="return checkData()" action="${pageContext.request.contextPath }/blog/search/1.html" method="get" class="navbar-form navbar-right" role="search">
			        <div class="form-group">
			          <input value="${searchStr }" name="searchStr" id="searchStr" type="text" class="form-control" placeholder="请输入要查询的关键字...">
			        </div>
			        <button type="submit" class="btn btn-default">搜索</button>
			      </form>
			      
			    </div><!-- /.navbar-collapse -->
			  </div><!-- /.container-fluid -->
			</nav>
		</div>
	</div>